import {reactive} from 'vue'

	import {
		getIndexGoodsList
	} from '@/api/goods.js'
export default function (name){
	
	
	let goodsShow = reactive({
		bannerImg: '',
		rows: []
	})
	getIndexGoodsList({
			name
		}).then(res => {
			// console.log(res)
			let {
				bannerImg,
				rows
			} = res
			goodsShow.bannerImg = bannerImg
			goodsShow.rows = rows
		})
		.catch(err => {
			console.log(err)
		})
		
		return {
			goodsShow
		}
}